-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Enable CA1822 (Mark members as static) analyzer #66333
Conversation
Tagging subscribers to this area: @dotnet/area-meta Issue Detailsnull
|
src/coreclr/nativeaot/Runtime.Base/src/System/AttributeUsageAttribute.cs
Show resolved
Hide resolved
src/libraries/Common/src/Interop/Windows/SspiCli/SafeDeleteContext.cs
Outdated
Show resolved
Hide resolved
src/libraries/Common/src/Interop/Windows/SspiCli/SecuritySafeHandles.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.DataContractSerialization/src/System/Xml/XmlBinaryWriter.cs
Show resolved
Hide resolved
src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs
Outdated
Show resolved
Hide resolved
public void TraceNode(QilNode n) | ||
{ | ||
#if QIL_TRACE_NODE_CREATION | ||
this.diag.AddNode(n); | ||
#endif | ||
} | ||
#pragma warning restore CA1822 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@krwq, is any of this tracing stuff ever used? Wondering if we can just delete it all instead.
...s/System.Reflection.Metadata/src/System/Reflection/Metadata/Ecma335/MetadataBuilder.Heaps.cs
Outdated
Show resolved
Hide resolved
...ation.Formatters/src/System/Runtime/Serialization/Formatters/Binary/BinaryFormatterWriter.cs
Outdated
Show resolved
Hide resolved
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Array.CoreRT.cs
Outdated
Show resolved
Hide resolved
dcf6f93
to
2c165a0
Compare
src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Unix.cs
Outdated
Show resolved
Hide resolved
...DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs
Show resolved
Hide resolved
@@ -710,15 +710,15 @@ private void OnIndexedHeaderName(int index) | |||
_state = State.HeaderValueLength; | |||
} | |||
|
|||
private void OnIndexedHeaderNamePostBase(int index) | |||
private static void OnIndexedHeaderNamePostBase(int index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These won't be static once they're actually implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's fine, one you implemented them you remove static
@@ -10,9 +10,9 @@ internal sealed class DefaultSettingsSection // ConfigurationSection | |||
|
|||
internal static DefaultSettingsSection GetSection() => s_section; | |||
|
|||
public string DistributedTransactionManagerName { get; set; } = ConfigurationStrings.DefaultDistributedTransactionManagerName; | |||
public static string DistributedTransactionManagerName { get; set; } = ConfigurationStrings.DefaultDistributedTransactionManagerName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roji should weigh in on whether any of these changes are going to conflict with his work.
@@ -710,15 +710,15 @@ private void OnIndexedHeaderName(int index) | |||
_state = State.HeaderValueLength; | |||
} | |||
|
|||
private void OnIndexedHeaderNamePostBase(int index) | |||
private static void OnIndexedHeaderNamePostBase(int index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this file is mirrored with aspnetcore. It'd be good to validate whether it's going to break anything when that happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should be fine as it's private and aspnetcore already had them static (they have CS1822 enabled) before sync with runtime removed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the remaining comments, LGTM. (I don't plan to re-review the 642 files again ;-)
No description provided.